public class preOrder extends BinaryTree{
    //前序遍历
    public void preOrder(TreeNode root) {
        if(root == null) {
            return;
        }
        preOrder(root.left);
        System.out.println(root.val);
        preOrder(root.left);
    }
}
